
import request from '@/utils/request'
import { baseUrl } from '@/config/env';

//获取列表
export const getList = (page, size, params) => {
  	return request({
	    url: baseUrl+'/rest/product/list',
	    method: 'get',
	    params: {
	      	page,
		    size,
		    ...params
	    }
  	})
}

//编辑
export const addList = (data) => {
	return request({
	  url: baseUrl+'/rest/product/edit',
	  method: 'post',
	  data
	})
}

//删除
export const delList = (id) => {
	return request({
	  url: baseUrl+'/rest/product/delete/' + id,
	  method: 'get'
	})
}

//详情
export const getDetail = (id) => {
	return request({
	  url: baseUrl+'/rest/product/detail/' + id,
	  method: 'get'
	})
}